﻿
<CnGalWebSite.Components.Containers.MasaTitleContainer Icon="@IconType.Home.ToIconString()" Title="主要信息" Class="@(ShowTagSearch?"mb-4":Class)" Collapable>
     <MRow>
         <MCol Cols="12" Md="6" Lg="3">
            <CnGalWebSite.Components.Images.UploadButton ShowCropper @bind-ImagePath="@Model.MainPicture" Type="ImageAspectType._16_9" Text="上传主图" Class="mb-4" />
         </MCol>
         <MCol Cols="12" Md="6" Lg="3">
             <CnGalWebSite.Components.Images.UploadButton ShowCropper @bind-ImagePath="@Model.Thumbnail" Type="ImageAspectType._1_1" Text="上传缩略图" Class="mb-4" />
         </MCol>
         <MCol Cols="12" Md="6" Lg="3">
             <CnGalWebSite.Components.Images.UploadButton @bind-ImagePath="@Model.BackgroundPicture" Type="ImageAspectType.None" Text="上传大背景图" Class="mb-4" />
         </MCol>
         <MCol Cols="12" Md="6" Lg="3">
             <CnGalWebSite.Components.Images.UploadButton @bind-ImagePath="@Model.SmallBackgroundPicture" Type="ImageAspectType.None" Text="上传小背景图" Class="mb-4" />
         </MCol>
         <MCol Cols="12">
         </MCol>
         <MCol Cols="12" Md="6">
             <MTextField @bind-Value="Model.Name" Label="唯一名称" />
         </MCol>
         <MCol Cols="12" Md="6">
             <CnGalWebSite.Components.Inputs.MasaAutoComplete @bind-Value="@Model.ParentTagName" Label="父标签" AutoCompleteItems="TagItems" />
         </MCol>

         <MCol Cols="12">
             <MTextarea Rows="3" @bind-Value="Model.BriefIntroduction" Label="简介" />
         </MCol>
    </MRow>
</CnGalWebSite.Components.Containers.MasaTitleContainer>

@if (ShowTagSearch)
{
    <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Cards.SearchTagsCard Class="@Class" />
}

@code {
    [Parameter]
    public EditTagMainViewModel Model { get; set; } 
    [Parameter]
    public string Class { get; set; }
    [Parameter]
    public bool ShowTagSearch { get; set; }
    [Parameter]
    public List<string> TagItems { get; set; }

}
